<link rel="stylesheet" type="text/css" th:href="@{/H-UI/lib/webuploader/0.1.5/webuploader.css}" />

<article class="cl pd-20" >
    <form  class="form form-horizontal" id="form-add">
        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>名称：</label>
            <div class="formControls col-xs-7 ">
                <input type="hidden" th:value="${goods.id}" name="id"/>
                <input type="text" class="input-text" th:value="${goods.name}" placeholder="" id="name" name="name" />
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>分类：</label>
            <div class="formControls col-xs-7 ">
                <span class="select-box">
                    <select name="cid" class="select" id="g_category" >
                        <option value="">请选择</option>
                        <option th:each="c: ${categories}" th:value="${c.id}" th:text="${c.name}"  th:selected="${c.id eq goods.cid}"></option>
                    </select>
                </span>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>价格：</label>
            <div class="formControls col-xs-7 ">
                <input type="text" class="input-text" th:value="${goods.price}" placeholder="" id="price" name="price" />
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>库存：</label>
            <div class="formControls col-xs-7 ">
                <input type="text" class="input-text" th:value="${goods.stock}" placeholder="" id="stock" name="stock" />
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>图片：</label>
            <div class="formControls col-xs-7 ">
                <div id="imgupload">
                    <!--用来存放item-->
                    <div id="fileList" class="uploader-list"></div>
                    <div id="filePicker">选择图片</div>
                </div>

                <input type="hidden"  th:value="${goods.picture}" id="picture" name="picture" />
            </div>
            <!--<div><i class="icon-ok"></i></div>-->
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;">描述：</label>
            <div class="formControls col-xs-7 ">
                <textarea name="description" cols="" rows="" class="textarea" th:text="${goods.description}" placeholder="说点什么..."></textarea>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-xs-offset-3">
                <input class="btn btn-primary radius" id="submit" type="button" value="&nbsp;&nbsp;提交&nbsp;&nbsp;" />
            </div>
        </div>



    </form>
</article>

    <script type="text/javascript" th:src="@{/H-UI/lib/jquery.validation/1.14.0/jquery.validate.js}"></script>
    <script type="text/javascript" th:src="@{/H-UI/lib/jquery.validation/1.14.0/messages_zh.js}"></script>
    <script type="text/javascript" th:src="@{/H-UI/lib/webuploader/0.1.5/webuploader.js}"></script>


    <script type="text/javascript" th:src="@{/scripts/goods/edit.js}"></script>

